Skip to content

Remove the custom dependency checker in favor of Knip and syncpack - #1443

Merged
filipsobol merged 18 commits into
masterfrom
ci/4564-replace-depcheck-with-knip
Aug 19, 2026
Merged

filipsobol merged 18 commits into
masterfrom
ci/4564-replace-depcheck-with-knip

Conversation

@filipsobol

@filipsobol filipsobol commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

🚀 Summary

Removes the deprecated @ckeditor/ckeditor5-dev-dependency-checker package and uses maintained external tools directly: Knip checks unused and missing dependencies, while syncpack checks dependency versions and keeps the existing --fix workflow. Self-imports are covered by the ckeditor5-rules/no-scoped-imports-within-package ESLint rule. A major-breaking changelog entry is included for consumers of the removed package.


📌 Related issues


💡 Additional information

Comment thread scripts/knip/dependencies.ts Resolved
@pomek

pomek commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

The migration addresses the linked issue and recognizes literal dynamic imports, but it does not preserve several existing validation guarantees. Package-local development dependencies, missing relative CSS imports, and self-imports can now pass validation. The version checker also cannot launch on Windows.

Changes

  • Blocker → Enforce package-local development dependencies. The non-production command in package.json:55 allows Knip to resolve dependencies from the root manifest, while the strict pass excludes tests. Removing vitest from packages/ckeditor5-dev-ci/package.json still passed check-dependencies. Validate development imports against each workspace’s own manifest.
  • Blocker → Restore the custom CSS and self-import checks. With the configuration at knip.ts:59-85, both a missing relative CSS import and an import from a package into itself passed check-dependencies. Preserve these explicit contracts with separate validation or an equivalent Knip integration.
  • Important → Launch Syncpack portably. scripts/ci/check-dependencies-versions-match.mjs:19-20 directly spawns the extensionless POSIX shim. Windows requires the .cmd launcher or invoking Syncpack’s JavaScript entry point through process.execPath.
  • Important → Add behavioral regression tests. Clean-tree execution only proves the current manifests pass. Add mutation-based or fixture tests covering missing production and development dependencies, dynamic imports, CSS imports, self-imports, misplaced dependencies, and --fix.

Notes

Local baseline checks passed: dependency validation, version validation, typecheck, targeted lint, and script tests. CircleCI validation and release preparation were still pending at review time.

Comment thread package.json Resolved
Comment thread scripts/knip/dependencies.ts Resolved
Comment thread scripts-tests/checkdependencies.mjs Resolved
Comment thread package.json Resolved
Comment thread package.json Resolved
@filipsobol
filipsobol requested a review from a team as a code owner August 18, 2026 10:16

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 11cd75e. Configure here.

Comment thread .circleci/template.yml Resolved
@filipsobol filipsobol changed the title Remove the depcheck-based dependency checker in favor of Knip Remove the custom dependency checker in favor of Knip and syncpack Aug 18, 2026
@filipsobol
filipsobol merged commit 25026c7 into master Aug 19, 2026
8 checks passed
@filipsobol
filipsobol deleted the ci/4564-replace-depcheck-with-knip branch August 19, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants